#include<iostream>
#include<string>
#include<vector>
#include<algorithm>
using namespace std;

class Solution {
public:
    int fib(int n) {
        if(n==0){
            return 0;
        }
        if(n==1){
            return 1;
        }
        int a = 0;
        int sum = 1;
        while(n>1){
            int b = sum;
            sum = (sum+a)%t;
            a = b;
            n--;
        }
        return sum;
    }
public:
    long long t = 1000000007;
};
int main(){
    Solution S;
    cout<<S.fib(39)<<endl;
}